package com.szsh.aiot.hsm.dto.camera;

import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;

import java.time.Instant;
import java.util.Date;

/**
 * 摄像头异常信息
 * 
 * @author
 *
 */
@Measurement(name = "camera_abnormal")
public class CameraAbnormal {
    /** 异常产生时间 */
    @Column(name = "time")
    private Instant time;
    /** 手机号码哈希值 */
    @Column(name = "hashPhone", tag = true)
    private String hashPhone;
    /** 手机号码 */
    @Column(name = "phone")
    private String phone;
    /** 设备MAC */
    @Column(name = "deviceMac")
    private String deviceMac;
    /** 设备名称 */
    @Column(name = "sourceIP")
    private String sourceIP;
    /** 设备名称 */
    @Column(name = "sourceArea")
    private String sourceArea;
    /** 设备名称 */
    @Column(name = "pushReason")
    private Integer pushReason;

    private String deviceName;

    private Date loginTime;

    public Instant getTime() {
        return time;
    }

    public void setTime(Instant time) {
        this.time = time;
    }

    public String getHashPhone() {
        return hashPhone;
    }

    public void setHashPhone(String hashPhone) {
        this.hashPhone = hashPhone;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getDeviceMac() {
        return deviceMac;
    }

    public void setDeviceMac(String deviceMac) {
        this.deviceMac = deviceMac;
    }

    public String getSourceIP() {
        return sourceIP;
    }

    public void setSourceIP(String sourceIP) {
        this.sourceIP = sourceIP;
    }

    public String getSourceArea() {
        return sourceArea;
    }

    public void setSourceArea(String sourceArea) {
        this.sourceArea = sourceArea;
    }

    public Integer getPushReason() {
        return pushReason;
    }

    public void setPushReason(Integer pushReason) {
        this.pushReason = pushReason;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public Date getLoginTime() {
        this.loginTime = Date.from(time);
        return this.loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }
}
